package com.net.oil.main.fragment;
/*
 * Created by lch on 2018/2/21 0021.
 */

import androidx.fragment.app.Fragment;

import com.net.oil.R;

public class FragmentFactory {
    public static Fragment getInstance(int checkId){
        Fragment fragment;
        switch (checkId) {
            case R.id.home_page_button:
                fragment = HomePageFragment.newInstance();
                break;
            case R.id.shop_button:
                fragment = ShopFragment.newInstance();
                break;
            case R.id.news_button:
                fragment = NewsFragment.newInstance();
                break;
            case R.id.technology_area:
                fragment = TechnologySupportFragment.newInstance();
                break;
            case R.id.my_button:
                fragment = MyFragment.newInstance();
                break;
            default:
                fragment = null;
                break;
        }
        return fragment;
    }
}
